wayland: Do not require latest wl_seat
authorPier Luigi Fiorini <pierluigi.fiorini@gmail.com>
Wed, 11 Feb 2015 06:46:00 +0000 (06:46 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 14 Feb 2015 00:05:32 +0000 (19:05 -0500)
Some compositors might not offer wl_seat 4 resulting in GTK+ clients not
working on that compositor.

wl_seat 4 introduces keyboard repeat information, but when that information
is missing it is retrieved from settings, hence there's no reason to
require wl_seat 4.

This patch was tested against QtCompositor (5.5, dev branch)
and Weston 1.6.1.

Reviewed-by: Daniel Stone <daniels@collabora.com>
https://bugzilla.gnome.org/show_bug.cgi?id=744172

gdk/wayland/gdkdisplay-wayland.c

index 007d37a8f8593e5c91f8b11448d9f3d5962a7b7a..0be9ab6965847268cfeb0305236853cb42835356 100644 (file)
@@ -172,7 +172,7 @@ gdk_registry_handle_global(void *data, struct wl_registry *registry, uint32_t id
       wl_registry_bind(display_wayland->wl_registry, id, &wl_output_interface, MIN (version, 2));
     _gdk_wayland_screen_add_output(display_wayland->screen, id, output, MIN (version, 2));
   } else if (strcmp(interface, "wl_seat") == 0) {
-    seat = wl_registry_bind(display_wayland->wl_registry, id, &wl_seat_interface, 4);
+    seat = wl_registry_bind(display_wayland->wl_registry, id, &wl_seat_interface, MIN (version, 4));
     _gdk_wayland_device_manager_add_seat (gdk_display->device_manager, id, seat);
   } else if (strcmp(interface, "wl_data_device_manager") == 0) {
       display_wayland->data_device_manager =